/*
** list_reverse.c for liblist in /home/guina_b/
** 
** Made by benoit guina
** Login   <guina_b@epitech.net>
** 
** Started on  Fri Jan 01 00:00:00 2010 benoit guina
** Last update Fri Jan 01 00:00:00 2010 benoit guina
*/

#include "list.h"

void	*list_reverse(void *l)
{
  void	*previous;
  void	*next;
  void	*handler;

  handler = l;
  previous = 0;
  while (handler)
    {
      next = *(void **)handler;
      *(void **)handler = previous;
      previous = handler;
      handler = next;
    }
  return (previous);
}
